﻿@model InfoSource.Models.Views.ManageDoNotMarketListViewModel


@{
	ViewBag.Title = "Manage Do-Not-Market List";
    Layout = ViewBag.IsPartial == true ? "" : "~/Views/Shared/_Layout.cshtml";
	
}


    <div id="manageDoNotMarketListPage" class='pageContent' key="@Url.Content("~/tools/managedonotmarketlist")">
		<h2 class="pageTitle">Manage Do-Not-Market List</h2>

		<div class="printableOutput">
            <span>Output to printable version:</span>
            <select id="sel_manageDoNotMarketListPage_PrintableOutputType">
                <option value="webpage">Web Page</option>
                <option value="excel">Excel</option>
            </select>
            <button id="btn_manageDoNotMarketListPage_printableOutput">Go</button>
        </div>
        
        <div id='zipsContainer'>
			@{
    			string city;
				foreach (InfoSource.Data.Do_Not_Market_List zipcode in Model.ZipCodes)
				{
					<div class='zipContainer' zip='@zipcode.Zip' city='@zipcode.colorado_zipcode.FirstOrDefault().city'>
						<span class='actions'>
							<button class='btnDelete'>Delete</button>
						</span>
						<span class='zipcode'>
							@zipcode.Zip
						</span>
						<span class='city'>
							@zipcode.colorado_zipcode.FirstOrDefault().city
						</span>
					</div>
				} 
			}

			<div id="addNewContainer" class="zipContainer">
				<span class='actions'>
					<button id="btnAdd">Add</button>
				</span>
				<span class='zipcode'>
					<select id="selAddNew">
						@{
							foreach (InfoSource.Data.colorado_zipcode coZip in Model.RemainingZipCodes)
							{
									<option value="@coZip.zip" city="@coZip.city">
										@coZip.zip &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @coZip.city
									</option>
							}									
						}
					</select>
				</span>
			</div><!-- addNewContainer -->
		</div><!-- zipsContainer -->
		
		<div id='mapContainer'>
			<div id='map_canvas'>
				map not loaded
			</div>
		</div>

    </div><!-- mainContent -->


@{
	this.ViewContext.Controller.ViewData["Scripts"] = new List<string>(){
		"/InfoSource/Content/Scripts/Views/ManageDoNotMarketListView.js"
	};

	this.ViewContext.Controller.ViewData["StyleSheets"] = new List<string>(){
		"/InfoSource/Content/Styles/Views/ManageDoNotMarketListView.css"
	};

	this.ViewContext.Controller.ViewData["InlineScripts"] = new List<string>(){
		"InfoSource.ManageDoNotMarketList.ZipCodes = " + Model.SerializedZipCodes
	};
}
